package com.zdp.contentcenter;

import com.zdp.contentcenter.configuration.feign.UserCenterFeignConfiguration;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.Bean;
import org.springframework.web.client.RestTemplate;
import tk.mybatis.spring.annotation.MapperScan;

/**
 * @author sesshomaru
 * @date 2020/9/16 22:19
 */
@MapperScan("com.zdp")
@EnableFeignClients
// feign的粗粒度配置
// @EnableFeignClients(defaultConfiguration = UserCenterFeignConfiguration.class)
@SpringBootApplication
public class ContentCenterApplication {
    public static void main(String[] args) {
        SpringApplication.run(ContentCenterApplication.class, args);
    }

    // 为restTemplate整合ribbon
    @LoadBalanced
    @Bean
    public RestTemplate restTemplate() {
        return new RestTemplate();
    }
}
